package com.culture.java.online.education.platform.common.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum Code {

    // 传统的写法
//    private static final Code SUCCESS = new Code(200, "成功");

    SUCCESS(200, "成功"),
    FAILURE(500, "失败 - 服务器异常"),
    PARAM_VALID_ERROR(501, "参数校验错误");

    private Integer code;

    private String message;

}
